/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelDirecorio.java
 *
 * Created on 11/01/2012, 05:46:27 PM
 */
package com.torresquintero.oncologos.secretaria.vista;

/**
 *
 * @author Camilo Andres
 */
public class PanelDirecorio extends javax.swing.JPanel {

//    /** Creates new form PanelDirecorio */
//    ControladorPacientes control;
//    private VentanaSecretaria ventana;
//
//    public PanelDirecorio(VentanaSecretaria ventana) {
//        initComponents();
//        control = ControladorPacientes.getInstance();
//
//        DefaultTableModel dtm = (DefaultTableModel) tablaPersonas.getModel();
//        dtm.setRowCount(0);
//        for (Paciente paciente : control.listarTiposLosPacientes()) {
//
//            dtm.addRow(new Object[]{paciente.getDocumento(),
//                        paciente.getNombre(),
//                        paciente.getApellido(),
//                        paciente.getEMail()});
//        }
//
//        this.ventana=ventana;
//
//
//    }
//
//    /** This method is called from within the constructor to
//     * initialize the form.
//     * WARNING: Do NOT modify this code. The content of this method is
//     * always regenerated by the Form Editor.
//     */
//    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        tablaPersonas = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();

        tablaPersonas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Documento", "Nombre", "Apellido", "e-mail"
            }
        ));
        jScrollPane1.setViewportView(tablaPersonas);

        jButton1.setText("Ver");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)
                    .addComponent(jButton1))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(87, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1)
                .addGap(15, 15, 15))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
//        String documento = (String) tablaPersonas.getValueAt(tablaPersonas.getSelectedRow(), 0);
//        ventana.agregarPanel(new PanelCrearPaciente(documento, ventana));
//        
    }//GEN-LAST:event_jButton1ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tablaPersonas;
    // End of variables declaration//GEN-END:variables
}
